package com.biz.impl;

import java.util.List;
import java.util.Map;

import com.bean.House;
import com.bean.SearchCondition;
import com.biz.HouseBiz;
import com.dao.HouseDao;
import com.dao.impl.HouseDaoImpl;

public class HouseBizImpl implements HouseBiz {
	private HouseDao dao = new HouseDaoImpl();
	
	@Override
	public List<House> search(SearchCondition sc, int pageIndex) {
		List<House> lst = dao.search(sc, pageIndex);
		return lst.size() != 0 ? lst : null;
	}

	@Override
	public House get(int id) {
		return dao.get(id);
	}

	// 添加房屋
	@Override
	public void add(House house) {
		dao.add(house);
	}

	@Override
	public int getTotal(SearchCondition sc) {
		return dao.getTotal(sc);
	}

}
